import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        while(sc.hasNext()){
            String str=sc.nextLine();
            int left=0;
            int right=0;
            Queue<String> q=new LinkedList<>();
            while(right<str.length()){
                while(right<str.length()&&str.charAt(right)==' '||str.charAt(right)=='"'){
                    right++;
                }
                left=right;
                while(right<str.length()&&str.charAt(right)!=' '){
                    right++;
                }
                q.offer(str.substring(left,right));
            }
            System.out.println(q.size());
            while(!q.isEmpty()){
                System.out.println(q.poll());
            }
        }
    }
}